import { useEntTradeData, useTradeData } from '@/components/TradeSelect/useTradeData';
import type { SelectProps } from 'antd';
import { Select } from 'antd';

// 选择行业属性 全部行业的
export function TradeSelect(props: Omit<SelectProps<string, { label: string; value: string }>, 'options'>) {
  const { data = [] } = useTradeData();
  return <Select options={data} {...props} />;
}
type ss = {
  entId: string;
};
// 选择行业属性 企业的行业
export function EntTradeSelect(props: Omit<SelectProps<string, { label: string; value: string }>, 'options'> & ss) {
  // const { entId } = useAppSelector((state) => state.loginEnt); //organizationType 1:协会，0：企业
  const data = useEntTradeData(props.entId);
  return <Select options={data} {...props} />;
}
